#ifndef SIGNLETON_H
#define SIGNLETON_H

template <class T>
class Signleton {
 public:
  static T& instance() {
    static T value_;
    return value_;
  }

 protected:  // 派生类可以访问
  Signleton() {}
  virtual ~Signleton() {}
};

#endif
